import scala.language.postfixOps

/**
 *
 * @author cdhuangchao3
 * @date 2023/6/4 4:17 PM
 */
object Test01_TestOperator {

  def main(args: Array[String]): Unit = {

    val r3 = 10.0 / 3
    println(r3.formatted("%6.2f"))

    // 2.比较
    val s1 = "hello"
    val s2 = new String(s1)
    println("s1==s2:"+(s1==s2))
    println("s1.equals(s2):"+(s1.equals(s2)))
    println("s1.eq(s2):"+(s1.eq(s2 )))

    // 6.运算符的本质
    val n1:Int = 2
    val n2 = 3
    println("n1+n2="+(n1.+(n2)))

    println((7.5 toInt) toString)
  }
}
